package com.tanhua.dubbo.api;

import com.tanhua.model.mongo.Movement;
import com.tanhua.model.vo.PageResult;

import java.util.List;

/**
 * @author lifeihu
 * @date 2021/12/26
 * @TIME:19:00
 */
public interface MovementApi {
    /**
     * 发布动态
     */
    public void publish(Movement movement);
    PageResult findByUserId(Long userId, Integer page, Integer pagesize);
    /**
     * 查询好友动态
     */
    List<Movement> findFriendMovements(Integer page, Integer pagesize, Long userId);

    //根据pid数组查询动态
    List<Movement> findMovementsByPids(List<Long> pids);

    //随机获取多条动态数据
    List<Movement> randomMovements(Integer counts);

    //根据id查询
    Movement findById(String movementId);

    PageResult findMovementsByUserid(Long uid, Integer state, Integer page, Integer pagesize);
    void update(String movementId, Integer state);
}
